<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<h2>
	<c:choose>
	<c:when test="${application.isEditing()}">Editace aplikace</c:when>
	<c:otherwise>Přidání aplikace</c:otherwise>
	</c:choose>
</h2>
<form:form commandName="application" method="post" action="${pageContext.request.contextPath}/application/doUpload" enctype="multipart/form-data">
	<form:hidden path="id"/>
 	<form:hidden path="editing"/>
    <table class="imagetable">
    <tr>
        <th><form:label path="nazev">Název</form:label></th>
        <td><form:input path="nazev" size="40" /><form:errors path="nazev" cssClass="error"/></td> 
    </tr>
    <tr>
        <th><form:label path="popis">Popis</form:label></th>
        <td><form:textarea path="popis" rows="5" cols="60" /><form:errors path="popis" cssClass="error"/></td>
    </tr>
    <tr>
        <th><form:label path="tags">Tagy</form:label></th>
        <td><form:textarea path="tags"  rows="2" cols="60" /><form:errors path="tags" cssClass="error"/></td>
    </tr>
    <tr>
        <th><form:label path="icon">Ikona</form:label></th>
        <td><input type="file" name="icon" accept="image/*" /><form:errors path="icon" cssClass="error"/></td>
    </tr>
    <tr>
        <th><form:label path="content">Obsah</form:label></th>
        <td><input type="file" name="content" accept="application/x-zip-compressed" /><form:errors path="content" cssClass="error"/></td>
    </tr>
   	<tfoot>
		<tr><td colspan="2"><input type="submit" class="gobutton" value="Uložit"/></td></tr>
	</tfoot>
</table>  
     
</form:form>